<div id="page-wrapper">
	<div class="row">
		<div class="col-lg-12">
			<h3 class="page-header">
				<span>投票活动</span>
			</h3>
		</div>
		<!-- /.col-lg-12 -->
	</div>
	<!-- /.row -->

	<div class="row">
		<div class="col-lg-12">
			<div class="panel panel-default">
				<div class="panel-heading">
					<form id="praiseOpera" style="float: left;">
						<button type="submit" formaction="{:U('User/Praise/edit')}" formmethod="post" class="btn btn-sm btn-info dword-size">增&emsp;加</button>
						<!--<button type="submit" formaction="{:U('User/Praise/delete')}" formmethod="post" class="btn btn-sm btn-danger dword-size">删&emsp;除</button>-->
					</form>

					<form class="input-group" action="/User/Praise/index" style="width: 300px;margin-left: 60%;">
						<input type="text" class="form-control" name='praiseName' placeholder="Search...">
						<span class="input-group-btn">
							<button class="btn btn-default" type="submit">
								<i class="fa fa-search"></i>
							</button>
						</span>
					</form>

				</div>
				<!-- /.panel-heading -->
				<div class="panel-body">
					<div class="table-responsive">
						<table class="table table-bordered">
							<thead>
								<tr>
									<!--<th><input type="checkbox" data-action="checkboxAll"></th>-->
									<th width="5%">编号</th>
									<th width="20%">活动名称</th>
									<th width="30%">链接首页地址</th>
									<th width="10%">状态</th>
									<th width="10%">创建时间</th>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
								<foreach name='datas' item='data' >
									<tr>
										<!--<td><input type="checkbox" data-action="checkboxOnce" name="praises[]" value="{$data['id']}" form="praiseOpera"></td>-->
										<td>{$data['id']}</td>
										<td>{$data['title']}</td>
										<td><?php echo "http://" . $_SERVER['SERVER_NAME'] . "/Wap/Praise/index/praise/" . $data['id']?></td>
										<td>
											<?php
												if($data['status'] == -1){
													echo "<span style='color:red'>待发布</span>";
												}else{
													if($data['status'] == 0 && $data['enddate']>time()){
														echo "<span style='color:green'>已发布</span>";
													}else{
														echo "<span style='color:#eea236'>停用</span>";
													}
												}
											?>

										</td>
										<td>{$data['keyword']}</td>
										<td>
											<a type="button" href="{:U('User/Praise/edit', array('praise' => $data['id']))}" class="btn btn-info">编辑</a>
											<a type="button" href="{:U('User/Praise/items', array('praise_id' => $data['id']))}" class="btn btn-primary">投票项</a>
											<a type="button" href="{:U('User/Praise/setPublish', array('praise' => $data['id']))}" class="btn btn-success">发布</a>
											<br/><br/>
											<a type="button" href="{:U('User/Praise/share', array('id' => $data['id']))}" class="btn btn-default">分享</a>
											<a type="button" href="{:U('User/Praise/desc', array('id' => $data['id']))}" class="btn btn-default">说明</a>
											<a type="button" href="{:U('User/Praise/setStop', array('praise' => $data['id']))}" class="btn btn-warning">停用</a>
											<br/><br/>
											<a type="button" href="{:U('User/Praise/setDelete', array('praise' => $data['id']))}" class="btn btn-danger">删除</a>
										</td>
									</tr>
								</foreach>
							</tbody> 
						</table>
					</div>
					<!-- /.table-responsive -->
				</div>
				<!-- /.panel-body -->
			</div>
			<!-- /.panel -->
		</div>
		<!-- /.col-lg-6 -->
	</div>
	<div class="pages">
		{$page}
	</div>
	<!-- /.row -->
</div>
<!-- /#page-wrapper -->
<import type="js" file="common" basepath="/Public/js" />
<script type="text/javascript">
//	common.multiSelect.init( "checkboxAll", "checkboxOnce" );
</script>
